package com.gomore.opple.utils;

import com.fasterxml.jackson.databind.ObjectMapper;

import java.text.SimpleDateFormat;

/**
 * Company 上海勾芒科技有限公司.
 */
public class JacksonJsonMapper {
    private static volatile ObjectMapper objectMapper = null;

    public JacksonJsonMapper() {
    }

    public static ObjectMapper getInstance() {
        if (objectMapper == null) {
            Class var0 = ObjectMapper.class;
            synchronized (ObjectMapper.class) {
                if (objectMapper == null) {
                    objectMapper = new ObjectMapper();
                    objectMapper.setDateFormat(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"));
                }
            }
        }

        return objectMapper;
    }
}
